package com.xin.config;

import com.xin.filter.PermissionFilter;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


import javax.annotation.Resource;

@Configuration
public class WebVcConfiguration implements WebMvcConfigurer {
    @Resource
    private PermissionFilter permissionFilter;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {

        registry.addInterceptor(permissionFilter)
                .addPathPatterns("/**")
                .excludePathPatterns("/employee/login");
    }
}
